a4af8b3a3d5115a7814c1e937737968912515fa0,portal-impl/src/com/liferay/portal/events/ServicePreAction.java,ServicePreAction,servicePre,#HttpServletRequest#HttpServletResponse#,935
Before Change
}
else if (layout != null) {
if (wapTheme) {
theme = layout.getWapTheme();
colorScheme = layout.getWapColorScheme();
}
else {
theme = layout.getTheme();
colorScheme = layout.getColorScheme();
}
}
else {
String themeId = null;
String colorSchemeId = null;
if (wapTheme) {
themeId = ThemeImpl.getDefaultWapThemeId(companyId);
colorSchemeId = ColorSchemeImpl.getDefaultWapColorSchemeId();
}
else {
themeId = ThemeImpl.getDefaultRegularThemeId(companyId);
colorSchemeId =
ColorSchemeImpl.getDefaultRegularColorSchemeId();
}
theme = ThemeLocalServiceUtil.getTheme(
companyId, themeId, wapTheme);
colorScheme = ThemeLocalServiceUtil.getColorScheme(
companyId, theme.getThemeId(), colorSchemeId, wapTheme);
}
request.setAttribute(WebKeys.THEME, theme);
request.setAttribute(WebKeys.COLOR_SCHEME, colorScheme);
boolean themeCssFastLoad = SessionParamUtil.getBoolean(
request, "css_fast_load", PropsValues.THEME_CSS_FAST_LOAD);
boolean themeImagesFastLoad = SessionParamUtil.getBoolean(
request, "images_fast_load", PropsValues.THEME_IMAGES_FAST_LOAD);
boolean themeJsBarebone = PropsValues.JAVASCRIPT_BAREBONE_ENABLED;
if (themeJsBarebone) {
if (signedIn) {
themeJsBarebone = false;
}
}
boolean themeJsFastLoad = SessionParamUtil.getBoolean(
request, "js_fast_load", PropsValues.JAVASCRIPT_FAST_LOAD);
String lifecycle = ParamUtil.getString(request, "p_p_lifecycle", "0");
lifecycle = ParamUtil.getString(request, "p_t_lifecycle", lifecycle);
boolean isolated = ParamUtil.getBoolean(request, "p_p_isolated");
String facebookCanvasPageURL = (String)request.getAttribute(
WebKeys.FACEBOOK_CANVAS_PAGE_URL);
boolean widget = false;
Boolean widgetObj = (Boolean)request.getAttribute(WebKeys.WIDGET);
if (widgetObj != null) {
widget = widgetObj.booleanValue();
}
// Theme display
ThemeDisplay themeDisplay = ThemeDisplayFactory.create();
// Set the CDN host, portal URL, and Facebook application ID first
// because other methods (setLookAndFeel) depend on them being set
themeDisplay.setCDNHost(cdnHost);
themeDisplay.setPortalURL(portalURL);
themeDisplay.setFacebookCanvasPageURL(facebookCanvasPageURL);
themeDisplay.setWidget(widget);
themeDisplay.setCompany(company);
themeDisplay.setCompanyLogo(companyLogo);
themeDisplay.setCompanyLogoHeight(companyLogoHeight);
themeDisplay.setCompanyLogoWidth(companyLogoWidth);
themeDisplay.setRealCompanyLogo(realCompanyLogo);
themeDisplay.setRealCompanyLogoHeight(realCompanyLogoHeight);
themeDisplay.setRealCompanyLogoWidth(realCompanyLogoWidth);
themeDisplay.setUser(user);
themeDisplay.setRealUser(realUser);
themeDisplay.setDoAsUserId(doAsUserId);
themeDisplay.setDoAsUserLanguageId(doAsUserLanguageId);
themeDisplay.setDoAsGroupId(doAsGroupId);
themeDisplay.setRefererPlid(refererPlid);
themeDisplay.setControlPanelCategory(controlPanelCategory);
themeDisplay.setLayoutSet(layoutSet);
themeDisplay.setLayoutSetLogo(layoutSetLogo);
themeDisplay.setLayout(layout);
themeDisplay.setLayouts(layouts);
themeDisplay.setUnfilteredLayouts(unfilteredLayouts);
themeDisplay.setPlid(plid);
themeDisplay.setLayoutTypePortlet(layoutTypePortlet);
themeDisplay.setScopeGroupId(scopeGroupId);
themeDisplay.setParentGroupId(parentGroupId);
themeDisplay.setSignedIn(signedIn);
themeDisplay.setPermissionChecker(permissionChecker);
themeDisplay.setLocale(locale);
themeDisplay.setLanguageId(LocaleUtil.toLanguageId(locale));
themeDisplay.setI18nLanguageId(i18nLanguageId);
themeDisplay.setI18nPath(i18nPath);
themeDisplay.setTimeZone(timeZone);
themeDisplay.setDevice(device);
themeDisplay.setLookAndFeel(contextPath, theme, colorScheme);
themeDisplay.setThemeCssFastLoad(themeCssFastLoad);
themeDisplay.setThemeImagesFastLoad(themeImagesFastLoad);
themeDisplay.setThemeJsBarebone(themeJsBarebone);
After Change
request.setAttribute(WebKeys.THEME, theme);
request.setAttribute(WebKeys.COLOR_SCHEME, colorScheme);
themeDisplay.setLookAndFeel(contextPath, theme, colorScheme);
}
themeDisplay.setThemeCssFastLoad(themeCssFastLoad);